package com.xbai.goods.service;

import com.github.pagehelper.PageInfo;
import com.xbai.goods.pojo.CategoryBrand;

import java.util.List;

/**
 * @desc CategoryBrand业务层接口
 * @author jxbai
 * @date 2021/1/28
 */
public interface CategoryBrandService {

    /**
     * CategoryBrand条件+分页查询
     * @param categoryBrand {@link CategoryBrand}
     * @param page 页码
     * @param size 页大小
     * @return {@link PageInfo<CategoryBrand>} 分页结果
     */
    PageInfo<CategoryBrand> findPage(CategoryBrand categoryBrand, int page, int size);

    /**
     * CategoryBrand分页查询
     * @param page 页码
     * @param size 页大小
     * @return {@link PageInfo<CategoryBrand>}
     */
    PageInfo<CategoryBrand> findPage(int page, int size);

    /**
     * CategoryBrand条件查询
     * @param categoryBrand {@link CategoryBrand}
     * @return {@link List < CategoryBrand >}
     */
    List<CategoryBrand> findList(CategoryBrand categoryBrand);

    /**
     * 删除CategoryBrand
     * @param id 主键id
     */
    void delete(Integer id);

    /**
     * 修改CategoryBrand数据
     * @param categoryBrand {@link CategoryBrand}
     */
    void update(CategoryBrand categoryBrand);

    /**
     * 新增CategoryBrand
     * @param categoryBrand {@link CategoryBrand}
     */
    void add(CategoryBrand categoryBrand);

    /**
     * 根据ID查询CategoryBrand
     * @param id 主键id
     * @return {@link CategoryBrand}
     */
     CategoryBrand findById(Integer id);

    /**
     * 查询所有CategoryBrand
     * @return {@link List < CategoryBrand >}
     */
    List<CategoryBrand> findAll();
}
